using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using Web.Core;
using Web.Core.Providers;

namespace Web.Core.Objects
{
    public class Manufacturers
    {
        public static ArrayList GetAllManufacturers(int pageNumber, int pageSize)
        {
            return DataProvider.GetInstance().GetAllManufacturers(pageNumber, pageSize);
        }
        public static ArrayList GetAllManufacturers()
        {
            return DataProvider.GetInstance().GetManufacturers(0, "", "");
        }

        public static Manufacturer GetManufacturersByID(int mID)
        {
            return DataProvider.GetInstance().GetManufacturers(mID, "", "")[0] as Manufacturer;
        }
        public static int InsertManufacturer(Manufacturer man)
        {
            return DataProvider.GetInstance().CreateUpdateDeleteManufacturers(man, GlobalStorage.Action.Insert);
        }

        public static int UpdateManufacturer(Manufacturer man)
        {
            return DataProvider.GetInstance().CreateUpdateDeleteManufacturers(man, GlobalStorage.Action.Update);
        }

        public static int DeleteManufacturer(Manufacturer man)
        {
            return DataProvider.GetInstance().CreateUpdateDeleteManufacturers(man, GlobalStorage.Action.Delete);
        }
    }
}
